-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename candidate center id to registration center #4078
Rename candidate center id to registration center #4078
Conversation
@cmadjar i'm trying to apply the patch and get the error |
@zaliqarosli I modified the patch. I ran with the same issue but could never figure out why it failed when everything is done with one query. I just split the query in 3 statements and it worked for me. Give it a try. Thanks!! |
@cmadjar @zaliqarosli When applying all 3 changes in a single command, the DB server commit only at the semi-column. Thus, when trying to change the column name, the FK is not yet drop, nor the when trying to add it back with the new column name. Using 3 separate command (with auto-commit), ensure that the FK is first drop before renaming the column and the column is renamed before adding back the FK. Check the code, look good with of course a few minor thing Travis pointed. |
@PapillonMcGill Thank you for the clarification. That makes a lot of sense! |
@cmadjar could you rebase so changes to media module is included? there's a bug with hidden headers on this branch that was fixed on major. other than that, everything else looks good |
40f41f9
to
54f739c
Compare
@zaliqarosli rebased to the latest version of aces/major. Please review again when you can. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zaliqarosli Thank you for your review!! All your comments should be taken care off. The only ones I did not change anything are for the genomic browser. I don't think genomic data is linked to a session but only to a candidate. @xlecours Is that right?
@zaliqarosli Sorry, I dismissed your review by merging @xlecours PR to my branch (I missed one instance of CenterID in the genomic module) |
@cmadjar I concur. There is no session liked to genomic data; yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c.centerID should be c.RegistrationCenterID
@@ -246,7 +246,7 @@ class Mri_Violations extends \NDB_Menu_Filter_Form | |||
AND mpvs.CandID = s.CandID | |||
) | |||
LEFT JOIN psc p | |||
ON (p.CenterID = c.CenterID) | |||
ON (p.CenterID = s.CenterID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be " ON (p.CenterID = c. RegistrationCenterID)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kongtiaowang actually I modified the join to join to the session CenterID in the queries you mentioned because I think it is best to use the CenterID of the session table here (s.CenterID) since a scan is linked to a session and the session's CenterID will be more informative about where the scans was performed than the CenterID from the candidate table if a candidate belongs to multiple sites.
I am not sure either this is why travis is failing. The Travis error is:
UnknownServerException: document.querySelector(...) is null
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: '4e44a21cd803', ip: '172.18.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-101-generic', java.version: '1.8.0_91'
Driver info: driver.version: unknown
/app/vendor/facebook/webdriver/lib/WebDriverExceptions.php:79
/app/vendor/facebook/webdriver/lib/remote/HttpCommandExecutor.php:268
/app/vendor/facebook/webdriver/lib/remote/RemoteWebDriver.php:491
/app/vendor/facebook/webdriver/lib/remote/RemoteWebDriver.php:270
/app/modules/mri_violations/test/mri_violationsTest.php:538
/app/modules/mri_violations/test/mri_violationsTest.php:448
does not seem to be related with the renaming of the CenterID field. Does it? Not sure either why this means?
@kongtiaowang I agree with @cmadjar s.centerid makes more sens here |
@cmadjar if you manually test MRI violations is everything working fine ? thats where travis seems to be having issues |
@ridz1208 Indeed, the MRI violation module seems to work OK aside from what @nicolasbrossard reported which is a bug on major unrelated to my changes:
|
28f3d96
0013677
to
28f3d96
Compare
28f3d96
to
0013677
Compare
@cmadjar EDIT: I fixed it directly on github |
@PapillonMcGill @zaliqarosli @nicolasbrossard @ridz1208 @xlecours A force push deleted your approval review. Could you look at that PR one last time? Thanks! |
@cmadjar i'm getting a lot of issues with the issue tracker :( so i'm going to properly test again |
@cmadjar is this good to go already?? |
@driusan yes pretty please :). This way I can start working on phase 2 this week! |
…rojectID to c.RegistrationProjectID (#4919) This does 3 related changes to add user projects to LORIS: 1. Add the ProjectID field to sessions in the same manner as centers are affiliated to sessions for future development of project permissions 2. Change the candidate.ProjectID to candidate.RegistrationProjectID to remain consistent with the centerID changes done in #4078 3. Add necessary foreign keys to the SQL and fix existing fields to support the foreign keys from all tables.
Brief summary of changes
This PR rename the
CenterID
field column of thecandidate
table toRegistrationCenterID
, which will correspond to theCenterID
at which the candidate was first registered. This should never be changed for a given candidate. This is part 1 of the refactoring of the candidate's CenterID. (See #4058 for details on part 2 of the refactoring).Associate LORIS-MRI PR
aces/Loris-MRI#341 (@nicolasbrossard will test it)
This resolves issue...
To test this change...
Notes for reviewers
I assigned above several people to test various parts of LORIS that were affected by the changes based on my knowledge of who worked on which module. Figured it would be less overwhelming if several people tested one part of the PR instead of having to test everything.
Note that since I don't have any genomics data or media and issue tracker set up, I could not test genomic browser, media or issue tracker.
@driusan @ridz1208 I was not sure who to assign the dashboard, new profile, candidate list, timepoint list, conflict resolvers and the tools. Maybe you can help filling the gap?
Notes for existing projects
RegistrationCenterID
should never be changed for a given candidate. Thesession
table will have the information about the latestCenterID
the candidate has been seen.c.CenterID
is replaced byc.RegistrationCenterID
in your project code queries.